/*
 * Powered By ljc
 * Since 2013 - 2013
 */

package com.ljc.app.dao;

import com.ljc.app.model.User;
import com.ljc.app.query.UserQuery;
import common.base.BaseIbatis3Dao;
import common.util.page.PageList;
import org.springframework.stereotype.Repository;

/**
 * @author Liu_jc
 * @since 1.0
 */


@Repository
public class UserDao extends BaseIbatis3Dao<User,Integer>{
	
	@Override
	public String getIbatisMapperNamesapce() {
		return "User";
	}
	
	public void saveOrUpdate(User entity) {
		if(entity.getId() == null) 
			save(entity);
		else 
			update(entity);
	}
	
	public PageList findPage(UserQuery query) {
		return pageQuery("User.findPage",query);
	}
	

}
